from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from . import views

urlpatterns = [
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SMSCodeView.as_view()),  # 短信验证
    url(r'^users/$', views.UserView.as_view()),  # 用户注册
    # url(r'^authorizations/$', obtain_jwt_token),
    url(r'^authorizations/$', views.AuthorizationsView.as_view()),  # 用户登陆
    url(r'^userdetail/(?P<user_id>\d+)/$', views.UserDetailAPIView.as_view()),  # 用户详情档案
    url(r'^userdetails/(?P<pk>\d+)/$', views.UserChangeDetailAPIView.as_view()),  # 修改用户档案
    url(r'^user/education/(?P<pk>\d+)/$', views.UserChangeEduExpAPIView.as_view()),  # 修改用户教育经历
    url(r'^user/avatar/$', views.UserAvatarAPIView.as_view()),  # 头像上传
    url(r'^userinfo/(?P<user_id>\d+)/$', views.UserInfoView.as_view()),  # 用户账户页面显示
    url(r'^userinfoupdate/(?P<pk>\d+)/$', views.UserInfoUpdateView.as_view()),  # 用户账户页面修改
    url(r'^user/answers/(?P<pk>\d+)/$', views.UserAnswer.as_view()),
    url(r'^usermyquestion/(?P<user_id>\d+)/$', views.UserMyquestionView.as_view()),  # 用户账户页面修改

]